www.gusucode.com > ROCKOA PHP协同办公OA办公系统 v2.0PHP源码程序 > ROCKOA PHP协同办公OA办公系统 v2.0/rockoa_v2.0/rockoa_v2.0/webrock/humanres/kaoqin/ext_kaoqin_setscript.js
var grid0,grid1,grid2,mid=0,sid=0; var panel=[{ xtype:'rockgrid',region:'west',width:200,keywhere:'and `type`=0 and `mid`=0',split:true,bbarbool:false,defaultorder:'sort', tablename:'kq_set',storefields:'id,recename,name', columns:[{ xtype: 'rownumberer', width: 40 },{ text:'名称',dataIndex:'name',flex:1 }], click:function(a, v){ var a = v.raw; mid = a.id; grid1.formwinhide(); grid1.searchgoto("and `type`='"+mid+"'"); } },{ xtype:'rockgridform',bbarbool:false,defaultorder:'sort',formtitle:'考勤次数',title:'考勤次数', tablename:'kq_set',storeautoLoad:false,searchtools:false,fields:['etime'], region:'center',storefields:'id,name,type,sort,stime,etime,dt', formaddbefore:function(){ if(mid==0){ js.msg('msg','没有选择左边记录'); return; } return true; }, columns:[{ xtype: 'rownumberer', width: 34 },{ text:'名称',dataIndex:'name',flex:1 },{ text:'针对日期',dataIndex:'dt',autowidth:true },{ text:'时间',dataIndex:'stime',autowidth:true,renderer:function(v,m,v1){ return ''+v+'至'+v1.get('etime'); } },{ text:'排序号',dataIndex:'sort',width:'15%' }], clickgrid:function(a, v){ var a = v.raw; sid = a.id; grid2.formwinhide(); grid2.searchgoto("and mid='"+sid+"'"); }, formparams:{ submitfields:'name,sort,type,stime,dt,etime',autoScroll:false, params:{int_filestype:'sort,type',otherfields:'optdt={now}'}, items:[{ fieldLabel:'id号',value:'0',name:'idPost',hidden:true },{ value:'0',name:'typePost',hidden:true },{ fieldLabel:''+bitian+'名称',name:'namePost',allowBlank: false },{ fieldLabel:'针对日期',name:'dtPost',xtype:'datefield',format:'Y-m-d' },{ fieldLabel:''+bitian+'开始时间',name:'stimePost',xtype:'rockdate',format:'H:i:s',allowBlank: false },{ fieldLabel:''+bitian+'截止时间',name:'etimePost',xtype:'rockdate',format:'H:i:s',allowBlank: false },{ fieldLabel:'序号',name:'sortPost',value:'0',minValue:0,xtype:'numberfield' }], submitcheck:function(o){ if(o.getVal('id')=='0')o.setVal('type', mid); return ''; } } },{ xtype:'rockgridform',title:'考勤状态值',formtitle:'考勤状态值', tablename:'kq_set',storeautoLoad:false,defaultorder:'sort', region:'east',width:'47%',split:true,bbarbool:false,searchtools:false, formaddbefore:function(){ if(sid==0){ js.msg('msg','没有选择中间的考勤记录'); return; } return true; }, columns:[{ xtype: 'rownumberer', width: 40 },{ text:'名称',dataIndex:'name',width:100 },{ text:'开始时间',dataIndex:'stime',flex:1 },{ text:'截止时间',dataIndex:'etime',flex:1 },{ text:'取值方式',dataIndex:'qtype',renderer:renderbox,boxdata:[['blue','最小值'],['green','最大值']] },{ text:'排序号',dataIndex:'sort',width:60 }], tbar:['其他时间段视为未打卡'], formparams:{ submitfields:'name,sort,mid,stime,etime,qtype',autoScroll:false, params:{int_filestype:'sort,mid,qtype',otherfields:'optdt={now}'}, items:[{ fieldLabel:'id号',value:'0',name:'idPost',hidden:true },{ value:'0',name:'midPost',hidden:true },{ fieldLabel:''+bitian+'名称',xtype:'optioncombo',optionmnum:'kaoqintype',name:'namePost',allowBlank: false },{ fieldLabel:''+bitian+'时间从',name:'stimePost',xtype:'rockdate',allowBlank: false,format:'H:i:s' },{ fieldLabel:''+bitian+'到',name:'etimePost',xtype:'rockdate',allowBlank: false,format:'H:i:s' },{ fieldLabel:''+bitian+'取值方式',name:'qtypePost',allowBlank: false,xtype:'combo',editable:false,store:[['0','最小值'],['1','最大值']] },{ fieldLabel:'序号',name:'sortPost',value:'0',minValue:0,xtype:'numberfield' }], submitcheck:function(o){ o.setVal('mid', sid); return ''; } } }] return { panel:panel, init:function(){ grid0 = rock[index][0]; grid1 = rock[index][1]; grid2 = rock[index][2]; } };